<?php

/**
 * Created by PhpStorm.
 * User: dumbledore
 * Date: 2018/3/9
 * Time: 下午1:54
 */
class Manager_user extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->database();
        $this->load->library('form_validation');//加载表单验证类库
        $this->load->helper('json');
        $this->load->helper('url');
        $this->load->helper('common');
        $this->load->model('user_model');
        $this->load->model('customer_model');
        $this->load->model('admin_model');
        $this->load->library('session');
        $this->load->model('goods_model');
    }

    // 确认激活功能
    public function insure_activation()
    {
        $customer_id = $this->session->customer_id;
        $bool = $this->db->where(array("customer_id" => $customer_id))->update('app_manager_user', ['activation' => 1]);
        if ($bool) {
            send_json(array('code' => 0, 'data' => '', 'msg' => "保存成功"));
        } else {
            send_json(array('code' => -1, 'data' => '', 'msg' => "保存失败"));
        }

    }

}